package com.kingyea.mobilepolice.menu.service;

import com.kingyea.mobilepolice.menu.bean.Menu;
import com.kingyea.mobilepolice.menu.bean.MenuCondition;

import java.util.List;

/**
 * @author hx
 * @version v1.0.0
 * @description Menu 接口
 * @date Created in 2018-04-17 15:13:38
 */
public interface MenuService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    Menu getById(Integer id) throws Exception;

    /**
     * 列表
     *
     * @param condition
     * @return
     */
    List<Menu> search(MenuCondition condition) throws Exception;

    List<Menu> searchByUserId(String userId, Integer isAdd) throws Exception;

    List<Menu> searchMenuTreeByuserId(String userId) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(Integer id) throws Exception;

    /**
     * 添加
     *
     * @param menu
     * @return
     */
    Menu save(Menu menu) throws Exception;

    /**
     * 更新
     *
     * @param menu
     * @return
     */
    Menu update(Menu menu) throws Exception;

}
